<?php
class test_TestAssertion extends TestSet {


  # HTML output for passed test
  function pass_html() {
    $assert = new TestAssertion(true, "pass_message", "user_message");
    return $assert->toHtml();
  }

  function test_html_for_passed_test_should_contain_li_of_class_Pass() {
    $this->assert_match("<li[^<]*class=\"Pass\"", $this->pass_html());
  }

  function test_html_for_passed_test_should_contain_message() {
    $this->assert_match("pass_message", $this->pass_html());
  }

  function test_html_should_include_user_message() {
    $this->assert_match("user_message", $this->pass_html());
  }

  function test_html_should_be_valid() {
    $this->assert_valid_html($this->pass_html());
  }




  # HTML output for failed test
  function test_html_for_passed_test_should_contain_li_of_class_Fail() {
    $assert = new TestAssertion(false);
    $this->assert_match("<li[^<]*class=\"Fail\"", $assert->toHtml());
  }
}
?>
